package com.usian;

import com.usian.entity.PageResult;
import com.usian.entity.QueryPageBean;

import com.usian.pojo.Goods;
import com.usian.pojo.Role;
import com.usian.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "baizhi-provider")
public interface GoodsFeign {

    @RequestMapping("/goods/pageList")
    PageResult pageList(@RequestBody QueryPageBean queryPageBean);

    @RequestMapping("/goods/showList")
    List<User> showList(@RequestBody User user);

    @RequestMapping("/goods/findRole")
    List<Role> findRole();

    @RequestMapping("/goods/delete")
    void delete(@RequestParam Integer id);

    @RequestMapping("/goods/add")
    void add(@RequestBody Goods goods);

    @RequestMapping("/goods/update")
    void update(@RequestBody Goods goods);

    @RequestMapping("/goods/updateStatus")
    void updateStatus(@RequestParam Integer id,@RequestParam Integer status);

    @RequestMapping("/goods/register")
    void register(@RequestBody User user);
}
